package com.lti.appnet.module.repository;

import com.lti.appnet.module.domain.Module;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;

import java.util.List;

/**
 * Created by sinceow on 2014/7/30.
 */
public interface ModuleRepository extends MongoRepository<Module, String> {


    @Query("{'$or': [{'authorId': '1'}, {'authorId': ?0}]}")
    public List<Module> findAllIncludeAuthorId(String authorId);

    public List<Module> findByAuthorId(String authorId);
}
